<template>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[5, 10, 20, 30]"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next"
      :total="total">
    </el-pagination>
</template>
<script>
export default {
    props:{
        currentPage:{
            type:Number,
            default:1
        },
        pageSize:{
          type:Number
        },
        total:{
            type:Number,
            default: 0
        }
    },
    data(){
        return{
            
        }
    },
    methods:{
        handleSizeChange(val){
            this.$emit('size-change',val)
        },
        handleCurrentChange(val){
            this.$emit('current-change',val)
        }
    }
}
</script>
<style lang="stylus" scoped>
.el-pagination
    margin:20px 0 0 20px
</style>